<!DOCTYPE html>
<html lang="pt-br">
  <head>
    <meta charset="utf-8">
    <title>{% block title %}TICKETS{% endblock %}</title>
    <link href="/media/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/media/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
    <link href="/media/css/ticket.css" rel="stylesheet">
  </head>

  <body>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
	  {% if request.session.autorizado %}
	    <a class="brand" href="/home">..:: Tickets Devel ::..</a>
	  {% else %}
	    <a class="brand" href="/">..:: Tickets Devel ::..</a>
	  {% endif %}
          <div class="nav-collapse">
            <ul class="nav">
              {% block links %}
              {% endblock %}
            </ul>
            <p class="navbar-text pull-right">
	      {% if request.session.autorizado %}
		Bem vindo <b>{{ request.session.usuario.nome }}</b> | <a href="/logout">Encerrar Sess&atilde;o</a>
	      {% endif %}
	      {% if not request.session.autorizado %}
		Bem vindo <b>Visitante</b> |  Clique<a href="/usuario"> aqui</a> para se cadastrar!
	      {% endif %}
	    </p>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container-fluid">
      <div class="row-fluid" >
        <div class="span2 ">
        {% if request.session.autorizado %}
	  <ul class="well nav nav-list">
	    <li class="nav-header">Menu</li>
	    <li> <a href="/usuarios/">Usuários</a></li>
	    <li><a href="/empresas/">Empresas</a></li>
	    <li><a href="/chamados/">Chamados</a></li>
	    <li><a href="/maquinas/">Máquinas</a></li>
	  </ul>
	{% endif %}
	{% if not request.session.autorizado %}
	  <img src='/media/img/tickets.png' width="" />
	{% endif %}
        </div><!--/span-->

        <div class="span10">

        {% if aviso %}
            <div class="alert alert-block alert-success">
            <a class="close" data-dismiss="alert">x</a>
            <h3 class="alert-heading">Aviso!</h3>
            <p>{{ aviso }}</p>
            </div>
        {% endif %}


        {% if erros %}
            <div class="alert alert-block alert-error">
            <a class="close" data-dismiss="alert">x</a>
            <h3 class="alert-heading">Aviso: Erros encontrados!</h3>
            <ul>
            {% for erro in erros %}
                <li>{{ erro }}</li>
            {% endfor %}
            </ul>
            </div>
        {% endif %}

        {% block content %}
        {% endblock %}

        </div><!--/span-->
      </div><!--/row-->

      <p class='well' style='text-align: right;'>
      <b>Tickets - Devel Sistemas</b>
      </p>

    </div><!--/.fluid-container-->
 
    <script src="/media/bootstrap/js/jquery.js"></script>
    <script src="/media/bootstrap/js/bootstrap-alert.js"></script>
    <script src="/media/bootstrap/js/bootstrap-modal.js"></script>
    <script src="/media/bootstrap/js/bootstrap-dropdown.js"></script>
    <script src="/media/bootstrap/js/bootstrap-tab.js"></script>
    <script src="/media/bootstrap/js/bootstrap-tooltip.js"></script>
    <script src="/media/bootstrap/js/bootstrap-popover.js"></script>
    <script src="/media/bootstrap/js/bootstrap-button.js"></script>
    <script src="/media/bootstrap/js/bootstrap-collapse.js"></script>
    <script src="/media/bootstrap/js/bootstrap-carousel.js"></script>
    <script src="/media/bootstrap/js/bootstrap-typeahead.js"></script>

  </body>
</html>
